package main

import (
	"context"
	"fmt"
	_ "github.com/gogf/gf/contrib/drivers/mysql/v2"
	_ "github.com/gogf/gf/contrib/nosql/redis/v2"
	"github.com/gogf/gf/v2/database/gdb"
	"github.com/gogf/gf/v2/frame/g"
)

func main() {
	var (
		res any
	)
	res = g.DB().Model().Hook(PmsFindLanguageValueHook).Scan(&res)
	fmt.Print(res)
}

var PmsFindLanguageValueHook = gdb.HookHandler{
	Select: func(ctx context.Context, in *gdb.HookSelectInput) (result gdb.Result, err error) {
		g.Log().Info(ctx, "————————————————————————————————————————————————————————")
		g.Log().Info(ctx, in.Table)
		//result, err = in.Next(ctx)
		return
	},
}
